package day03;
//条件运算符
public class OperDemo6 {
    public static void main(String[] args) {
        //6. 条件运算符,boolean ? true : false
        int num=6;
        int flag=num%2==0?1:0;
        if (flag==1){
            System.out.println("num"+num+"是偶数");
        }else {
            System.out.println("num"+num+"是奇数");
        }

        int a=6,b=8;
        //输出最大值
        int max=a>b?a:b;
        System.out.println("max:"+max);//8
    }
}
